home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / schmrprt / r395rs.lha / struct.tex < prev    next >
LaTeX Document  |  1989-03-12  |  10.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 31 2e 20 53 74 72 | 75 63 74 75 72 65 20 6f |% 1. Str|ucture o|
|00000010| 66 20 74 68 65 20 6c 61 | 6e 67 75 61 67 65 0a 0a |f the la|nguage..|
|00000020| 5c 63 68 61 70 74 65 72 | 7b 4f 76 65 72 76 69 65 |\chapter|{Overvie|
|00000030| 77 20 6f 66 20 53 63 68 | 65 6d 65 7d 0a 0a 5c 73 |w of Sch|eme}..\s|
|00000040| 65 63 74 69 6f 6e 7b 53 | 65 6d 61 6e 74 69 63 73 |ection{S|emantics|
|00000050| 7d 0a 5c 6c 61 62 65 6c | 7b 73 65 6d 61 6e 74 69 |}.\label|{semanti|
|00000060| 63 73 65 63 74 69 6f 6e | 7d 0a 0a 54 68 69 73 20 |csection|}..This |
|00000070| 73 65 63 74 69 6f 6e 20 | 67 69 76 65 73 20 61 6e |section |gives an|
|00000080| 20 6f 76 65 72 76 69 65 | 77 20 6f 66 20 53 63 68 | overvie|w of Sch|
|00000090| 65 6d 65 27 73 20 73 65 | 6d 61 6e 74 69 63 73 2e |eme's se|mantics.|
|000000a0| 20 20 41 0a 64 65 74 61 | 69 6c 65 64 20 69 6e 66 | A.deta|iled inf|
|000000b0| 6f 72 6d 61 6c 20 73 65 | 6d 61 6e 74 69 63 73 20 |ormal se|mantics |
|000000c0| 69 73 20 74 68 65 20 73 | 75 62 6a 65 63 74 20 6f |is the s|ubject o|
|000000d0| 66 0a 63 68 61 70 74 65 | 72 73 7e 5c 72 65 66 7b |f.chapte|rs~\ref{|
|000000e0| 62 61 73 69 63 63 68 61 | 70 74 65 72 7d 20 74 68 |basiccha|pter} th|
|000000f0| 72 6f 75 67 68 7e 5c 72 | 65 66 7b 62 75 69 6c 74 |rough~\r|ef{built|
|00000100| 69 6e 63 68 61 70 74 65 | 72 7d 2e 20 20 46 6f 72 |inchapte|r}. For|
|00000110| 20 72 65 66 65 72 65 6e | 63 65 0a 70 75 72 70 6f | referen|ce.purpo|
|00000120| 73 65 73 2c 20 73 65 63 | 74 69 6f 6e 7e 5c 72 65 |ses, sec|tion~\re|
|00000130| 66 7b 66 6f 72 6d 61 6c | 73 65 6d 61 6e 74 69 63 |f{formal|semantic|
|00000140| 73 73 65 63 74 69 6f 6e | 7d 20 70 72 6f 76 69 64 |ssection|} provid|
|00000150| 65 73 20 61 20 66 6f 72 | 6d 61 6c 0a 73 65 6d 61 |es a for|mal.sema|
|00000160| 6e 74 69 63 73 20 6f 66 | 20 53 63 68 65 6d 65 2e |ntics of| Scheme.|
|00000170| 0a 0a 5c 76 65 73 74 20 | 46 6f 6c 6c 6f 77 69 6e |..\vest |Followin|
|00000180| 67 20 41 6c 67 6f 6c 2c | 20 53 63 68 65 6d 65 20 |g Algol,| Scheme |
|00000190| 69 73 20 61 20 73 74 61 | 74 69 63 61 6c 6c 79 20 |is a sta|tically |
|000001a0| 73 63 6f 70 65 64 20 70 | 72 6f 67 72 61 6d 6d 69 |scoped p|rogrammi|
|000001b0| 6e 67 0a 6c 61 6e 67 75 | 61 67 65 2e 20 20 45 61 |ng.langu|age. Ea|
|000001c0| 63 68 20 75 73 65 20 6f | 66 20 61 20 76 61 72 69 |ch use o|f a vari|
|000001d0| 61 62 6c 65 20 69 73 20 | 61 73 73 6f 63 69 61 74 |able is |associat|
|000001e0| 65 64 20 77 69 74 68 20 | 61 20 6c 65 78 69 63 61 |ed with |a lexica|
|000001f0| 6c 6c 79 0a 61 70 70 61 | 72 65 6e 74 20 62 69 6e |lly.appa|rent bin|
|00000200| 64 69 6e 67 20 6f 66 20 | 74 68 61 74 20 76 61 72 |ding of |that var|
|00000210| 69 61 62 6c 65 2e 0a 0a | 5c 76 65 73 74 20 53 63 |iable...|\vest Sc|
|00000220| 68 65 6d 65 20 68 61 73 | 20 6c 61 74 65 6e 74 20 |heme has| latent |
|00000230| 61 73 20 6f 70 70 6f 73 | 65 64 20 74 6f 20 6d 61 |as oppos|ed to ma|
|00000240| 6e 69 66 65 73 74 20 74 | 79 70 65 73 2e 20 20 54 |nifest t|ypes. T|
|00000250| 79 70 65 73 0a 61 72 65 | 20 61 73 73 6f 63 69 61 |ypes.are| associa|
|00000260| 74 65 64 20 77 69 74 68 | 20 76 61 6c 75 65 73 20 |ted with| values |
|00000270| 28 61 6c 73 6f 20 63 61 | 6c 6c 65 64 20 6f 62 6a |(also ca|lled obj|
|00000280| 65 63 74 73 29 20 72 61 | 74 68 65 72 20 74 68 61 |ects) ra|ther tha|
|00000290| 6e 20 77 69 74 68 0a 76 | 61 72 69 61 62 6c 65 73 |n with.v|ariables|
|000002a0| 2e 20 20 28 53 6f 6d 65 | 20 61 75 74 68 6f 72 73 |. (Some| authors|
|000002b0| 20 72 65 66 65 72 20 74 | 6f 20 6c 61 6e 67 75 61 | refer t|o langua|
|000002c0| 67 65 73 20 77 69 74 68 | 20 6c 61 74 65 6e 74 20 |ges with| latent |
|000002d0| 74 79 70 65 73 20 61 73 | 0a 77 65 61 6b 6c 79 20 |types as|.weakly |
|000002e0| 74 79 70 65 64 20 6f 72 | 20 64 79 6e 61 6d 69 63 |typed or| dynamic|
|000002f0| 61 6c 6c 79 20 74 79 70 | 65 64 20 6c 61 6e 67 75 |ally typ|ed langu|
|00000300| 61 67 65 73 2e 29 20 20 | 4f 74 68 65 72 20 6c 61 |ages.) |Other la|
|00000310| 6e 67 75 61 67 65 73 20 | 77 69 74 68 0a 6c 61 74 |nguages |with.lat|
|00000320| 65 6e 74 20 74 79 70 65 | 73 20 61 72 65 20 41 50 |ent type|s are AP|
|00000330| 4c 2c 20 53 6e 6f 62 6f | 6c 2c 20 61 6e 64 20 6f |L, Snobo|l, and o|
|00000340| 74 68 65 72 20 64 69 61 | 6c 65 63 74 73 20 6f 66 |ther dia|lects of|
|00000350| 20 4c 69 73 70 2e 20 20 | 4c 61 6e 67 75 61 67 65 | Lisp. |Language|
|00000360| 73 0a 77 69 74 68 20 6d | 61 6e 69 66 65 73 74 20 |s.with m|anifest |
|00000370| 74 79 70 65 73 20 28 73 | 6f 6d 65 74 69 6d 65 73 |types (s|ometimes|
|00000380| 20 72 65 66 65 72 72 65 | 64 20 74 6f 20 61 73 20 | referre|d to as |
|00000390| 73 74 72 6f 6e 67 6c 79 | 20 74 79 70 65 64 20 6f |strongly| typed o|
|000003a0| 72 0a 73 74 61 74 69 63 | 61 6c 6c 79 20 74 79 70 |r.static|ally typ|
|000003b0| 65 64 20 6c 61 6e 67 75 | 61 67 65 73 29 20 69 6e |ed langu|ages) in|
|000003c0| 63 6c 75 64 65 20 41 6c | 67 6f 6c 20 36 30 2c 20 |clude Al|gol 60, |
|000003d0| 50 61 73 63 61 6c 2c 20 | 61 6e 64 7e 43 2e 0a 0a |Pascal, |and~C...|
|000003e0| 5c 76 65 73 74 20 41 6c | 6c 20 6f 62 6a 65 63 74 |\vest Al|l object|
|000003f0| 73 20 63 72 65 61 74 65 | 64 20 69 6e 20 74 68 65 |s create|d in the|
|00000400| 20 63 6f 75 72 73 65 20 | 6f 66 20 61 20 53 63 68 | course |of a Sch|
|00000410| 65 6d 65 20 63 6f 6d 70 | 75 74 61 74 69 6f 6e 2c |eme comp|utation,|
|00000420| 20 69 6e 63 6c 75 64 69 | 6e 67 0a 70 72 6f 63 65 | includi|ng.proce|
|00000430| 64 75 72 65 73 20 61 6e | 64 20 63 6f 6e 74 69 6e |dures an|d contin|
|00000440| 75 61 74 69 6f 6e 73 2c | 20 68 61 76 65 20 75 6e |uations,| have un|
|00000450| 6c 69 6d 69 74 65 64 20 | 65 78 74 65 6e 74 2e 0a |limited |extent..|
|00000460| 4e 6f 20 53 63 68 65 6d | 65 20 6f 62 6a 65 63 74 |No Schem|e object|
|00000470| 20 69 73 20 65 76 65 72 | 20 64 65 73 74 72 6f 79 | is ever| destroy|
|00000480| 65 64 2e 20 20 54 68 65 | 20 72 65 61 73 6f 6e 20 |ed. The| reason |
|00000490| 74 68 61 74 0a 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |that.imp|lementat|
|000004a0| 69 6f 6e 73 20 6f 66 20 | 53 63 68 65 6d 65 20 64 |ions of |Scheme d|
|000004b0| 6f 20 6e 6f 74 20 28 75 | 73 75 61 6c 6c 79 21 29 |o not (u|sually!)|
|000004c0| 5c 20 72 75 6e 20 6f 75 | 74 20 6f 66 20 73 74 6f |\ run ou|t of sto|
|000004d0| 72 61 67 65 20 69 73 20 | 74 68 61 74 0a 74 68 65 |rage is |that.the|
|000004e0| 79 20 61 72 65 20 70 65 | 72 6d 69 74 74 65 64 20 |y are pe|rmitted |
|000004f0| 74 6f 20 72 65 63 6c 61 | 69 6d 20 74 68 65 20 73 |to recla|im the s|
|00000500| 74 6f 72 61 67 65 20 6f | 63 63 75 70 69 65 64 20 |torage o|ccupied |
|00000510| 62 79 20 61 6e 20 6f 62 | 6a 65 63 74 20 69 66 0a |by an ob|ject if.|
|00000520| 74 68 65 79 20 63 61 6e | 20 70 72 6f 76 65 20 74 |they can| prove t|
|00000530| 68 61 74 20 74 68 65 20 | 6f 62 6a 65 63 74 20 63 |hat the |object c|
|00000540| 61 6e 6e 6f 74 20 70 6f | 73 73 69 62 6c 79 20 6d |annot po|ssibly m|
|00000550| 61 74 74 65 72 20 74 6f | 20 61 6e 79 20 66 75 74 |atter to| any fut|
|00000560| 75 72 65 0a 63 6f 6d 70 | 75 74 61 74 69 6f 6e 2e |ure.comp|utation.|
|00000570| 20 20 4f 74 68 65 72 20 | 6c 61 6e 67 75 61 67 65 | Other |language|
|00000580| 73 20 69 6e 20 77 68 69 | 63 68 20 6d 6f 73 74 20 |s in whi|ch most |
|00000590| 6f 62 6a 65 63 74 73 20 | 68 61 76 65 20 75 6e 6c |objects |have unl|
|000005a0| 69 6d 69 74 65 64 0a 65 | 78 74 65 6e 74 20 69 6e |imited.e|xtent in|
|000005b0| 63 6c 75 64 65 20 41 50 | 4c 20 61 6e 64 20 6f 74 |clude AP|L and ot|
|000005c0| 68 65 72 20 4c 69 73 70 | 20 64 69 61 6c 65 63 74 |her Lisp| dialect|
|000005d0| 73 2e 0a 0a 5c 76 65 73 | 74 20 49 6d 70 6c 65 6d |s...\ves|t Implem|
|000005e0| 65 6e 74 61 74 69 6f 6e | 73 20 6f 66 20 53 63 68 |entation|s of Sch|
|000005f0| 65 6d 65 20 61 72 65 20 | 72 65 71 75 69 72 65 64 |eme are |required|
|00000600| 20 74 6f 20 62 65 20 70 | 72 6f 70 65 72 6c 79 20 | to be p|roperly |
|00000610| 74 61 69 6c 2d 72 65 63 | 75 72 73 69 76 65 2e 0a |tail-rec|ursive..|
|00000620| 54 68 69 73 20 61 6c 6c | 6f 77 73 20 74 68 65 20 |This all|ows the |
|00000630| 65 78 65 63 75 74 69 6f | 6e 20 6f 66 20 61 6e 20 |executio|n of an |
|00000640| 69 74 65 72 61 74 69 76 | 65 20 63 6f 6d 70 75 74 |iterativ|e comput|
|00000650| 61 74 69 6f 6e 20 69 6e | 20 63 6f 6e 73 74 61 6e |ation in| constan|
|00000660| 74 20 73 70 61 63 65 2c | 0a 65 76 65 6e 20 69 66 |t space,|.even if|
|00000670| 20 74 68 65 20 69 74 65 | 72 61 74 69 76 65 20 63 | the ite|rative c|
|00000680| 6f 6d 70 75 74 61 74 69 | 6f 6e 20 69 73 20 64 65 |omputati|on is de|
|00000690| 73 63 72 69 62 65 64 20 | 62 79 20 61 20 73 79 6e |scribed |by a syn|
|000006a0| 74 61 63 74 69 63 61 6c | 6c 79 0a 72 65 63 75 72 |tactical|ly.recur|
|000006b0| 73 69 76 65 20 70 72 6f | 63 65 64 75 72 65 2e 20 |sive pro|cedure. |
|000006c0| 20 54 68 75 73 20 77 69 | 74 68 20 61 20 74 61 69 | Thus wi|th a tai|
|000006d0| 6c 2d 72 65 63 75 72 73 | 69 76 65 20 69 6d 70 6c |l-recurs|ive impl|
|000006e0| 65 6d 65 6e 74 61 74 69 | 6f 6e 2c 0a 69 74 65 72 |ementati|on,.iter|
|000006f0| 61 74 69 6f 6e 20 63 61 | 6e 20 62 65 20 65 78 70 |ation ca|n be exp|
|00000700| 72 65 73 73 65 64 20 75 | 73 69 6e 67 20 74 68 65 |ressed u|sing the|
|00000710| 20 6f 72 64 69 6e 61 72 | 79 20 70 72 6f 63 65 64 | ordinar|y proced|
|00000720| 75 72 65 2d 63 61 6c 6c | 0a 6d 65 63 68 61 6e 69 |ure-call|.mechani|
|00000730| 63 73 2c 20 73 6f 20 74 | 68 61 74 20 73 70 65 63 |cs, so t|hat spec|
|00000740| 69 61 6c 20 69 74 65 72 | 61 74 69 6f 6e 20 63 6f |ial iter|ation co|
|00000750| 6e 73 74 72 75 63 74 73 | 20 61 72 65 20 75 73 65 |nstructs| are use|
|00000760| 66 75 6c 20 6f 6e 6c 79 | 20 61 73 0a 73 79 6e 74 |ful only| as.synt|
|00000770| 61 63 74 69 63 20 73 75 | 67 61 72 2e 0a 0a 5c 76 |actic su|gar...\v|
|00000780| 65 73 74 20 53 63 68 65 | 6d 65 20 70 72 6f 63 65 |est Sche|me proce|
|00000790| 64 75 72 65 73 20 61 72 | 65 20 6f 62 6a 65 63 74 |dures ar|e object|
|000007a0| 73 20 69 6e 20 74 68 65 | 69 72 20 6f 77 6e 20 72 |s in the|ir own r|
|000007b0| 69 67 68 74 2e 20 20 50 | 72 6f 63 65 64 75 72 65 |ight. P|rocedure|
|000007c0| 73 20 63 61 6e 20 62 65 | 0a 63 72 65 61 74 65 64 |s can be|.created|
|000007d0| 20 64 79 6e 61 6d 69 63 | 61 6c 6c 79 2c 20 73 74 | dynamic|ally, st|
|000007e0| 6f 72 65 64 20 69 6e 20 | 64 61 74 61 20 73 74 72 |ored in |data str|
|000007f0| 75 63 74 75 72 65 73 2c | 20 72 65 74 75 72 6e 65 |uctures,| returne|
|00000800| 64 20 61 73 20 72 65 73 | 75 6c 74 73 20 6f 66 0a |d as res|ults of.|
|00000810| 70 72 6f 63 65 64 75 72 | 65 73 2c 20 61 6e 64 20 |procedur|es, and |
|00000820| 73 6f 20 6f 6e 2e 20 20 | 4f 74 68 65 72 20 6c 61 |so on. |Other la|
|00000830| 6e 67 75 61 67 65 73 20 | 77 69 74 68 20 74 68 65 |nguages |with the|
|00000840| 73 65 20 70 72 6f 70 65 | 72 74 69 65 73 20 69 6e |se prope|rties in|
|00000850| 63 6c 75 64 65 0a 43 6f | 6d 6d 6f 6e 20 4c 69 73 |clude.Co|mmon Lis|
|00000860| 70 20 61 6e 64 20 4d 4c | 2e 20 5c 74 6f 64 6f 7b |p and ML|. \todo{|
|00000870| 52 6f 7a 61 73 3a 20 53 | 63 68 65 6d 65 20 68 61 |Rozas: S|cheme ha|
|00000880| 64 20 74 68 65 6d 20 66 | 69 72 73 74 2e 7d 0a 0a |d them f|irst.}..|
|00000890| 5c 76 65 73 74 20 4f 6e | 65 20 64 69 73 74 69 6e |\vest On|e distin|
|000008a0| 67 75 69 73 68 69 6e 67 | 20 66 65 61 74 75 72 65 |guishing| feature|
|000008b0| 20 6f 66 20 53 63 68 65 | 6d 65 20 69 73 20 74 68 | of Sche|me is th|
|000008c0| 61 74 20 63 6f 6e 74 69 | 6e 75 61 74 69 6f 6e 73 |at conti|nuations|
|000008d0| 2c 20 77 68 69 63 68 0a | 69 6e 20 6d 6f 73 74 20 |, which.|in most |
|000008e0| 6f 74 68 65 72 20 6c 61 | 6e 67 75 61 67 65 73 20 |other la|nguages |
|000008f0| 6f 6e 6c 79 20 6f 70 65 | 72 61 74 65 20 62 65 68 |only ope|rate beh|
|00000900| 69 6e 64 20 74 68 65 20 | 73 63 65 6e 65 73 2c 20 |ind the |scenes, |
|00000910| 61 6c 73 6f 20 68 61 76 | 65 0a 60 60 66 69 72 73 |also hav|e.``firs|
|00000920| 74 2d 63 6c 61 73 73 27 | 27 20 73 74 61 74 75 73 |t-class'|' status|
|00000930| 2e 20 20 43 6f 6e 74 69 | 6e 75 61 74 69 6f 6e 73 |. Conti|nuations|
|00000940| 20 61 72 65 20 75 73 65 | 66 75 6c 20 66 6f 72 20 | are use|ful for |
|00000950| 69 6d 70 6c 65 6d 65 6e | 74 69 6e 67 20 61 0a 77 |implemen|ting a.w|
|00000960| 69 64 65 20 76 61 72 69 | 65 74 79 20 6f 66 20 61 |ide vari|ety of a|
|00000970| 64 76 61 6e 63 65 64 20 | 63 6f 6e 74 72 6f 6c 20 |dvanced |control |
|00000980| 63 6f 6e 73 74 72 75 63 | 74 73 2c 20 69 6e 63 6c |construc|ts, incl|
|00000990| 75 64 69 6e 67 20 6e 6f | 6e 2d 6c 6f 63 61 6c 20 |uding no|n-local |
|000009a0| 65 78 69 74 73 2c 0a 62 | 61 63 6b 74 72 61 63 6b |exits,.b|acktrack|
|000009b0| 69 6e 67 2c 20 61 6e 64 | 20 63 6f 72 6f 75 74 69 |ing, and| corouti|
|000009c0| 6e 65 73 2e 20 20 53 65 | 65 20 73 65 63 74 69 6f |nes. Se|e sectio|
|000009d0| 6e 7e 5c 72 65 66 7b 63 | 6f 6e 74 69 6e 75 61 74 |n~\ref{c|ontinuat|
|000009e0| 69 6f 6e 73 7d 2e 0a 0a | 5c 76 65 73 74 20 41 72 |ions}...|\vest Ar|
|000009f0| 67 75 6d 65 6e 74 73 20 | 74 6f 20 53 63 68 65 6d |guments |to Schem|
|00000a00| 65 20 70 72 6f 63 65 64 | 75 72 65 73 20 61 72 65 |e proced|ures are|
|00000a10| 20 61 6c 77 61 79 73 20 | 70 61 73 73 65 64 20 62 | always |passed b|
|00000a20| 79 20 76 61 6c 75 65 2c | 20 77 68 69 63 68 0a 6d |y value,| which.m|
|00000a30| 65 61 6e 73 20 74 68 61 | 74 20 74 68 65 20 61 63 |eans tha|t the ac|
|00000a40| 74 75 61 6c 20 61 72 67 | 75 6d 65 6e 74 20 65 78 |tual arg|ument ex|
|00000a50| 70 72 65 73 73 69 6f 6e | 73 20 61 72 65 20 65 76 |pression|s are ev|
|00000a60| 61 6c 75 61 74 65 64 20 | 62 65 66 6f 72 65 20 74 |aluated |before t|
|00000a70| 68 65 0a 70 72 6f 63 65 | 64 75 72 65 20 67 61 69 |he.proce|dure gai|
|00000a80| 6e 73 20 63 6f 6e 74 72 | 6f 6c 2c 20 77 68 65 74 |ns contr|ol, whet|
|00000a90| 68 65 72 20 74 68 65 20 | 70 72 6f 63 65 64 75 72 |her the |procedur|
|00000aa0| 65 20 6e 65 65 64 73 20 | 74 68 65 20 72 65 73 75 |e needs |the resu|
|00000ab0| 6c 74 20 6f 66 20 74 68 | 65 0a 65 76 61 6c 75 61 |lt of th|e.evalua|
|00000ac0| 74 69 6f 6e 20 6f 72 20 | 6e 6f 74 2e 20 20 4d 4c |tion or |not. ML|
|00000ad0| 2c 20 43 2c 20 61 6e 64 | 20 41 50 4c 20 61 72 65 |, C, and| APL are|
|00000ae0| 20 74 68 72 65 65 20 6f | 74 68 65 72 20 6c 61 6e | three o|ther lan|
|00000af0| 67 75 61 67 65 73 20 74 | 68 61 74 20 61 6c 77 61 |guages t|hat alwa|
|00000b00| 79 73 0a 70 61 73 73 20 | 61 72 67 75 6d 65 6e 74 |ys.pass |argument|
|00000b10| 73 20 62 79 20 76 61 6c | 75 65 2e 0a 54 68 69 73 |s by val|ue..This|
|00000b20| 20 69 73 20 64 69 73 74 | 69 6e 63 74 20 66 72 6f | is dist|inct fro|
|00000b30| 6d 20 74 68 65 20 6c 61 | 7a 79 2d 65 76 61 6c 75 |m the la|zy-evalu|
|00000b40| 61 74 69 6f 6e 20 73 65 | 6d 61 6e 74 69 63 73 20 |ation se|mantics |
|00000b50| 6f 66 20 53 41 53 4c 2c | 0a 6f 72 20 74 68 65 20 |of SASL,|.or the |
|00000b60| 63 61 6c 6c 2d 62 79 2d | 6e 61 6d 65 20 73 65 6d |call-by-|name sem|
|00000b70| 61 6e 74 69 63 73 20 6f | 66 20 41 6c 67 6f 6c 20 |antics o|f Algol |
|00000b80| 36 30 2c 20 77 68 65 72 | 65 20 61 6e 20 61 72 67 |60, wher|e an arg|
|00000b90| 75 6d 65 6e 74 0a 65 78 | 70 72 65 73 73 69 6f 6e |ument.ex|pression|
|00000ba0| 20 69 73 20 6e 6f 74 20 | 65 76 61 6c 75 61 74 65 | is not |evaluate|
|00000bb0| 64 20 75 6e 6c 65 73 73 | 20 69 74 73 20 76 61 6c |d unless| its val|
|00000bc0| 75 65 20 69 73 20 6e 65 | 65 64 65 64 20 62 79 20 |ue is ne|eded by |
|00000bd0| 74 68 65 0a 70 72 6f 63 | 65 64 75 72 65 2e 0a 0a |the.proc|edure...|
|00000be0| 5c 74 6f 64 6f 7b 4c 69 | 73 70 27 73 20 63 61 6c |\todo{Li|sp's cal|
|00000bf0| 6c 20 62 79 20 76 61 6c | 75 65 20 73 68 6f 75 6c |l by val|ue shoul|
|00000c00| 64 20 62 65 20 65 78 70 | 6c 61 69 6e 65 64 20 6d |d be exp|lained m|
|00000c10| 6f 72 65 0a 61 63 63 75 | 72 61 74 65 6c 79 2e 20 |ore.accu|rately. |
|00000c20| 20 57 68 61 74 27 73 20 | 66 75 6e 6e 79 20 69 73 | What's |funny is|
|00000c30| 20 74 68 61 74 20 61 6c | 6c 20 76 61 6c 75 65 73 | that al|l values|
|00000c40| 20 61 72 65 20 72 65 66 | 65 72 65 6e 63 65 73 2e | are ref|erences.|
|00000c50| 7d 0a 0a 5c 76 65 73 74 | 20 53 63 68 65 6d 65 27 |}..\vest| Scheme'|
|00000c60| 73 20 6d 6f 64 65 6c 20 | 6f 66 20 61 72 69 74 68 |s model |of arith|
|00000c70| 6d 65 74 69 63 20 69 73 | 20 64 65 73 69 67 6e 65 |metic is| designe|
|00000c80| 64 20 74 6f 20 72 65 6d | 61 69 6e 20 61 73 20 69 |d to rem|ain as i|
|00000c90| 6e 64 65 70 65 6e 64 65 | 6e 74 20 61 73 0a 70 6f |ndepende|nt as.po|
|00000ca0| 73 73 69 62 6c 65 20 6f | 66 20 74 68 65 20 70 61 |ssible o|f the pa|
|00000cb0| 72 74 69 63 75 6c 61 72 | 20 77 61 79 73 20 69 6e |rticular| ways in|
|00000cc0| 20 77 68 69 63 68 20 6e | 75 6d 62 65 72 73 20 61 | which n|umbers a|
|00000cd0| 72 65 20 72 65 70 72 65 | 73 65 6e 74 65 64 20 77 |re repre|sented w|
|00000ce0| 69 74 68 69 6e 20 61 0a | 63 6f 6d 70 75 74 65 72 |ithin a.|computer|
|00000cf0| 2e 20 49 6e 20 53 63 68 | 65 6d 65 2c 20 65 76 65 |. In Sch|eme, eve|
|00000d00| 72 79 20 69 6e 74 65 67 | 65 72 20 69 73 20 61 20 |ry integ|er is a |
|00000d10| 72 61 74 69 6f 6e 61 6c | 20 6e 75 6d 62 65 72 2c |rational| number,|
|00000d20| 20 65 76 65 72 79 20 72 | 61 74 69 6f 6e 61 6c 20 | every r|ational |
|00000d30| 69 73 20 61 0a 72 65 61 | 6c 2c 20 61 6e 64 20 65 |is a.rea|l, and e|
|00000d40| 76 65 72 79 20 72 65 61 | 6c 20 69 73 20 61 20 63 |very rea|l is a c|
|00000d50| 6f 6d 70 6c 65 78 20 6e | 75 6d 62 65 72 2e 20 20 |omplex n|umber. |
|00000d60| 54 68 75 73 20 74 68 65 | 20 64 69 73 74 69 6e 63 |Thus the| distinc|
|00000d70| 74 69 6f 6e 20 62 65 74 | 77 65 65 6e 20 69 6e 74 |tion bet|ween int|
|00000d80| 65 67 65 72 0a 61 6e 64 | 20 72 65 61 6c 20 61 72 |eger.and| real ar|
|00000d90| 69 74 68 6d 65 74 69 63 | 2c 20 73 6f 20 69 6d 70 |ithmetic|, so imp|
|00000da0| 6f 72 74 61 6e 74 20 74 | 6f 20 6d 61 6e 79 20 70 |ortant t|o many p|
|00000db0| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 6c 61 6e 67 75 |rogrammi|ng langu|
|00000dc0| 61 67 65 73 2c 20 64 6f | 65 73 20 6e 6f 74 0a 61 |ages, do|es not.a|
|00000dd0| 70 70 65 61 72 20 69 6e | 20 53 63 68 65 6d 65 2e |ppear in| Scheme.|
|00000de0| 20 20 49 6e 20 69 74 73 | 20 70 6c 61 63 65 20 69 | In its| place i|
|00000df0| 73 20 61 20 64 69 73 74 | 69 6e 63 74 69 6f 6e 20 |s a dist|inction |
|00000e00| 62 65 74 77 65 65 6e 20 | 65 78 61 63 74 20 61 72 |between |exact ar|
|00000e10| 69 74 68 6d 65 74 69 63 | 2c 0a 77 68 69 63 68 20 |ithmetic|,.which |
|00000e20| 63 6f 72 72 65 73 70 6f | 6e 64 73 20 74 6f 20 74 |correspo|nds to t|
|00000e30| 68 65 20 6d 61 74 68 65 | 6d 61 74 69 63 61 6c 20 |he mathe|matical |
|00000e40| 69 64 65 61 6c 2c 20 61 | 6e 64 20 69 6e 65 78 61 |ideal, a|nd inexa|
|00000e50| 63 74 20 61 72 69 74 68 | 6d 65 74 69 63 20 6f 6e |ct arith|metic on|
|00000e60| 0a 61 70 70 72 6f 78 69 | 6d 61 74 69 6f 6e 73 2e |.approxi|mations.|
|00000e70| 20 20 41 73 20 69 6e 20 | 43 6f 6d 6d 6f 6e 20 4c | As in |Common L|
|00000e80| 69 73 70 2c 20 65 78 61 | 63 74 20 61 72 69 74 68 |isp, exa|ct arith|
|00000e90| 6d 65 74 69 63 20 69 73 | 20 6e 6f 74 20 6c 69 6d |metic is| not lim|
|00000ea0| 69 74 65 64 20 74 6f 0a | 69 6e 74 65 67 65 72 73 |ited to.|integers|
|00000eb0| 2e 0a 0a 0a 5c 73 65 63 | 74 69 6f 6e 7b 53 79 6e |....\sec|tion{Syn|
|00000ec0| 74 61 78 7d 0a 0a 53 63 | 68 65 6d 65 20 65 6d 70 |tax}..Sc|heme emp|
|00000ed0| 6c 6f 79 73 20 61 20 70 | 61 72 65 6e 74 68 65 73 |loys a p|arenthes|
|00000ee0| 69 7a 65 64 2d 6c 69 73 | 74 20 50 6f 6c 69 73 68 |ized-lis|t Polish|
|00000ef0| 20 6e 6f 74 61 74 69 6f | 6e 20 74 6f 20 64 65 73 | notatio|n to des|
|00000f00| 63 72 69 62 65 20 70 72 | 6f 67 72 61 6d 73 0a 61 |cribe pr|ograms.a|
|00000f10| 6e 64 20 28 6f 74 68 65 | 72 29 20 64 61 74 61 2e |nd (othe|r) data.|
|00000f20| 20 20 54 68 65 20 73 79 | 6e 74 61 78 20 6f 66 20 | The sy|ntax of |
|00000f30| 53 63 68 65 6d 65 2c 20 | 6c 69 6b 65 20 74 68 61 |Scheme, |like tha|
|00000f40| 74 20 6f 66 20 6d 6f 73 | 74 20 4c 69 73 70 0a 64 |t of mos|t Lisp.d|
|00000f50| 69 61 6c 65 63 74 73 2c | 20 70 72 6f 76 69 64 65 |ialects,| provide|
|00000f60| 73 20 66 6f 72 20 67 72 | 65 61 74 20 65 78 70 72 |s for gr|eat expr|
|00000f70| 65 73 73 69 76 65 20 70 | 6f 77 65 72 2c 20 6c 61 |essive p|ower, la|
|00000f80| 72 67 65 6c 79 20 64 75 | 65 20 74 6f 20 69 74 73 |rgely du|e to its|
|00000f90| 0a 73 69 6d 70 6c 69 63 | 69 74 79 2e 20 20 41 6e |.simplic|ity. An|
|00000fa0| 20 69 6d 70 6f 72 74 61 | 6e 74 20 63 6f 6e 73 65 | importa|nt conse|
|00000fb0| 71 75 65 6e 63 65 20 6f | 66 20 74 68 69 73 20 73 |quence o|f this s|
|00000fc0| 69 6d 70 6c 69 63 69 74 | 79 20 69 73 20 74 68 65 |implicit|y is the|
|00000fd0| 0a 73 75 73 63 65 70 74 | 69 62 69 6c 69 74 79 20 |.suscept|ibility |
|00000fe0| 6f 66 20 53 63 68 65 6d | 65 20 70 72 6f 67 72 61 |of Schem|e progra|
|00000ff0| 6d 73 20 61 6e 64 20 64 | 61 74 61 20 74 6f 20 75 |ms and d|ata to u|
|00001000| 6e 69 66 6f 72 6d 20 74 | 72 65 61 74 6d 65 6e 74 |niform t|reatment|
|00001010| 20 62 79 20 6f 74 68 65 | 72 0a 53 63 68 65 6d 65 | by othe|r.Scheme|
|00001020| 20 70 72 6f 67 72 61 6d | 73 2e 20 20 41 73 20 77 | program|s. As w|
|00001030| 69 74 68 20 6f 74 68 65 | 72 20 4c 69 73 70 20 64 |ith othe|r Lisp d|
|00001040| 69 61 6c 65 63 74 73 2c | 20 74 68 65 20 5c 69 64 |ialects,| the \id|
|00001050| 65 7b 72 65 61 64 7d 20 | 70 72 6f 63 65 64 75 72 |e{read} |procedur|
|00001060| 65 0a 70 61 72 73 65 73 | 20 69 74 73 20 69 6e 70 |e.parses| its inp|
|00001070| 75 74 3b 20 74 68 61 74 | 20 69 73 2c 20 69 74 20 |ut; that| is, it |
|00001080| 70 65 72 66 6f 72 6d 73 | 20 73 79 6e 74 61 63 74 |performs| syntact|
|00001090| 69 63 20 61 73 20 77 65 | 6c 6c 20 61 73 20 6c 65 |ic as we|ll as le|
|000010a0| 78 69 63 61 6c 0a 64 65 | 63 6f 6d 70 6f 73 69 74 |xical.de|composit|
|000010b0| 69 6f 6e 20 6f 66 20 77 | 68 61 74 20 69 74 20 72 |ion of w|hat it r|
|000010c0| 65 61 64 73 2e 0a 0a 0a | 5c 73 65 63 74 69 6f 6e |eads....|\section|
|000010d0| 7b 4e 6f 74 61 74 69 6f | 6e 20 61 6e 64 20 74 65 |{Notatio|n and te|
|000010e0| 72 6d 69 6e 6f 6c 6f 67 | 79 7d 0a 0a 0a 5c 73 75 |rminolog|y}...\su|
|000010f0| 62 73 65 63 74 69 6f 6e | 7b 45 73 73 65 6e 74 69 |bsection|{Essenti|
|00001100| 61 6c 20 61 6e 64 20 6e | 6f 6e 2d 65 73 73 65 6e |al and n|on-essen|
|00001110| 74 69 61 6c 20 66 65 61 | 74 75 72 65 73 7d 0a 0a |tial fea|tures}..|
|00001120| 5c 6c 61 62 65 6c 7b 65 | 73 73 65 6e 74 69 61 6c |\label{e|ssential|
|00001130| 73 65 63 74 69 6f 6e 7d | 0a 49 74 20 69 73 20 72 |section}|.It is r|
|00001140| 65 71 75 69 72 65 64 20 | 74 68 61 74 20 65 76 65 |equired |that eve|
|00001150| 72 79 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |ry imple|mentatio|
|00001160| 6e 20 6f 66 20 53 63 68 | 65 6d 65 20 73 75 70 70 |n of Sch|eme supp|
|00001170| 6f 72 74 0a 66 65 61 74 | 75 72 65 73 20 74 68 61 |ort.feat|ures tha|
|00001180| 74 20 61 72 65 20 6d 61 | 72 6b 65 64 20 61 73 20 |t are ma|rked as |
|00001190| 62 65 69 6e 67 20 5c 64 | 65 66 69 6e 69 6e 67 7b |being \d|efining{|
|000011a0| 65 73 73 65 6e 74 69 61 | 6c 7d 2e 20 20 46 65 61 |essentia|l}. Fea|
|000011b0| 74 75 72 65 73 20 6e 6f | 74 0a 65 78 70 6c 69 63 |tures no|t.explic|
|000011c0| 69 74 6c 79 20 6d 61 72 | 6b 65 64 20 61 73 20 65 |itly mar|ked as e|
|000011d0| 73 73 65 6e 74 69 61 6c | 20 61 72 65 20 6e 6f 74 |ssential| are not|
|000011e0| 20 65 73 73 65 6e 74 69 | 61 6c 2e 20 20 49 6d 70 | essenti|al. Imp|
|000011f0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 73 20 61 72 65 |lementat|ions are|
|00001200| 0a 66 72 65 65 20 74 6f | 20 6f 6d 69 74 20 6e 6f |.free to| omit no|
|00001210| 6e 2d 65 73 73 65 6e 74 | 69 61 6c 20 66 65 61 74 |n-essent|ial feat|
|00001220| 75 72 65 73 20 6f 66 20 | 53 63 68 65 6d 65 20 6f |ures of |Scheme o|
|00001230| 72 20 74 6f 20 61 64 64 | 20 65 78 74 65 6e 73 69 |r to add| extensi|
|00001240| 6f 6e 73 2c 0a 70 72 6f | 76 69 64 65 64 20 74 68 |ons,.pro|vided th|
|00001250| 65 20 65 78 74 65 6e 73 | 69 6f 6e 73 20 61 72 65 |e extens|ions are|
|00001260| 20 6e 6f 74 20 69 6e 20 | 63 6f 6e 66 6c 69 63 74 | not in |conflict|
|00001270| 20 77 69 74 68 20 74 68 | 65 20 6c 61 6e 67 75 61 | with th|e langua|
|00001280| 67 65 20 72 65 70 6f 72 | 74 65 64 0a 68 65 72 65 |ge repor|ted.here|
|00001290| 2e 20 20 49 6e 20 70 61 | 72 74 69 63 75 6c 61 72 |. In pa|rticular|
|000012a0| 2c 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |, implem|entation|
|000012b0| 73 20 6d 75 73 74 20 73 | 75 70 70 6f 72 74 20 70 |s must s|upport p|
|000012c0| 6f 72 74 61 62 6c 65 20 | 63 6f 64 65 20 62 79 0a |ortable |code by.|
|000012d0| 70 72 6f 76 69 64 69 6e | 67 20 61 20 73 79 6e 74 |providin|g a synt|
|000012e0| 61 63 74 69 63 20 6d 6f | 64 65 20 74 68 61 74 20 |actic mo|de that |
|000012f0| 70 72 65 65 6d 70 74 73 | 20 6e 6f 20 6c 65 78 69 |preempts| no lexi|
|00001300| 63 61 6c 20 63 6f 6e 76 | 65 6e 74 69 6f 6e 73 20 |cal conv|entions |
|00001310| 6f 66 20 74 68 69 73 0a | 72 65 70 6f 72 74 20 61 |of this.|report a|
|00001320| 6e 64 20 72 65 73 65 72 | 76 65 73 20 6e 6f 20 69 |nd reser|ves no i|
|00001330| 64 65 6e 74 69 66 69 65 | 72 73 20 6f 74 68 65 72 |dentifie|rs other|
|00001340| 20 74 68 61 6e 20 74 68 | 6f 73 65 20 6c 69 73 74 | than th|ose list|
|00001350| 65 64 20 61 73 20 73 79 | 6e 74 61 63 74 69 63 0a |ed as sy|ntactic.|
|00001360| 6b 65 79 77 6f 72 64 73 | 20 69 6e 20 73 65 63 74 |keywords| in sect|
|00001370| 69 6f 6e 7e 5c 72 65 66 | 7b 6b 65 79 77 6f 72 64 |ion~\ref|{keyword|
|00001380| 73 65 63 74 69 6f 6e 7d | 2e 0a 0a 0a 5c 73 75 62 |section}|....\sub|
|00001390| 73 65 63 74 69 6f 6e 7b | 45 72 72 6f 72 20 73 69 |section{|Error si|
|000013a0| 74 75 61 74 69 6f 6e 73 | 20 61 6e 64 20 75 6e 73 |tuations| and uns|
|000013b0| 70 65 63 69 66 69 65 64 | 20 62 65 68 61 76 69 6f |pecified| behavio|
|000013c0| 72 7d 0a 0a 5c 6d 61 69 | 6e 69 6e 64 65 78 7b 65 |r}..\mai|nindex{e|
|000013d0| 72 72 6f 72 7d 0a 57 68 | 65 6e 20 73 70 65 61 6b |rror}.Wh|en speak|
|000013e0| 69 6e 67 20 6f 66 20 61 | 6e 20 65 72 72 6f 72 20 |ing of a|n error |
|000013f0| 73 69 74 75 61 74 69 6f | 6e 2c 20 74 68 69 73 20 |situatio|n, this |
|00001400| 72 65 70 6f 72 74 20 75 | 73 65 73 20 74 68 65 20 |report u|ses the |
|00001410| 70 68 72 61 73 65 20 60 | 60 61 6e 0a 65 72 72 6f |phrase `|`an.erro|
|00001420| 72 20 69 73 20 73 69 67 | 6e 61 6c 6c 65 64 27 27 |r is sig|nalled''|
|00001430| 20 74 6f 20 69 6e 64 69 | 63 61 74 65 20 74 68 61 | to indi|cate tha|
|00001440| 74 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |t implem|entation|
|00001450| 73 20 6d 75 73 74 20 64 | 65 74 65 63 74 20 61 6e |s must d|etect an|
|00001460| 64 0a 72 65 70 6f 72 74 | 20 74 68 65 20 65 72 72 |d.report| the err|
|00001470| 6f 72 2e 20 20 49 66 20 | 73 75 63 68 20 77 6f 72 |or. If |such wor|
|00001480| 64 69 6e 67 20 64 6f 65 | 73 20 6e 6f 74 20 61 70 |ding doe|s not ap|
|00001490| 70 65 61 72 20 69 6e 20 | 74 68 65 20 64 69 73 63 |pear in |the disc|
|000014a0| 75 73 73 69 6f 6e 20 6f | 66 0a 61 6e 20 65 72 72 |ussion o|f.an err|
|000014b0| 6f 72 2c 20 74 68 65 6e | 20 69 6d 70 6c 65 6d 65 |or, then| impleme|
|000014c0| 6e 74 61 74 69 6f 6e 73 | 20 61 72 65 20 6e 6f 74 |ntations| are not|
|000014d0| 20 72 65 71 75 69 72 65 | 64 20 74 6f 20 64 65 74 | require|d to det|
|000014e0| 65 63 74 20 6f 72 20 72 | 65 70 6f 72 74 20 74 68 |ect or r|eport th|
|000014f0| 65 0a 65 72 72 6f 72 2c | 20 74 68 6f 75 67 68 20 |e.error,| though |
|00001500| 74 68 65 79 20 61 72 65 | 20 65 6e 63 6f 75 72 61 |they are| encoura|
|00001510| 67 65 64 20 74 6f 20 64 | 6f 20 73 6f 2e 20 20 41 |ged to d|o so. A|
|00001520| 6e 20 65 72 72 6f 72 20 | 73 69 74 75 61 74 69 6f |n error |situatio|
|00001530| 6e 20 74 68 61 74 0a 69 | 6d 70 6c 65 6d 65 6e 74 |n that.i|mplement|
|00001540| 61 74 69 6f 6e 73 20 61 | 72 65 20 6e 6f 74 20 72 |ations a|re not r|
|00001550| 65 71 75 69 72 65 64 20 | 74 6f 20 64 65 74 65 63 |equired |to detec|
|00001560| 74 20 69 73 20 75 73 75 | 61 6c 6c 79 20 72 65 66 |t is usu|ally ref|
|00001570| 65 72 72 65 64 20 74 6f | 20 73 69 6d 70 6c 79 0a |erred to| simply.|
|00001580| 61 73 20 60 60 61 6e 20 | 65 72 72 6f 72 2e 27 27 |as ``an |error.''|
|00001590| 0a 0a 5c 76 65 73 74 20 | 46 6f 72 20 65 78 61 6d |..\vest |For exam|
|000015a0| 70 6c 65 2c 20 69 74 20 | 69 73 20 61 6e 20 65 72 |ple, it |is an er|
|000015b0| 72 6f 72 20 66 6f 72 20 | 61 20 70 72 6f 63 65 64 |ror for |a proced|
|000015c0| 75 72 65 20 74 6f 20 62 | 65 20 70 61 73 73 65 64 |ure to b|e passed|
|000015d0| 20 61 6e 20 61 72 67 75 | 6d 65 6e 74 20 74 68 61 | an argu|ment tha|
|000015e0| 74 0a 74 68 65 20 70 72 | 6f 63 65 64 75 72 65 20 |t.the pr|ocedure |
|000015f0| 69 73 20 6e 6f 74 20 65 | 78 70 6c 69 63 69 74 6c |is not e|xplicitl|
|00001600| 79 20 73 70 65 63 69 66 | 69 65 64 20 74 6f 20 68 |y specif|ied to h|
|00001610| 61 6e 64 6c 65 2c 20 65 | 76 65 6e 20 74 68 6f 75 |andle, e|ven thou|
|00001620| 67 68 20 73 75 63 68 0a | 64 6f 6d 61 69 6e 20 65 |gh such.|domain e|
|00001630| 72 72 6f 72 73 20 61 72 | 65 20 73 65 6c 64 6f 6d |rrors ar|e seldom|
|00001640| 20 6d 65 6e 74 69 6f 6e | 65 64 20 69 6e 20 74 68 | mention|ed in th|
|00001650| 69 73 20 72 65 70 6f 72 | 74 2e 20 20 49 6d 70 6c |is repor|t. Impl|
|00001660| 65 6d 65 6e 74 61 74 69 | 6f 6e 73 20 6d 61 79 0a |ementati|ons may.|
|00001670| 65 78 74 65 6e 64 20 61 | 20 70 72 6f 63 65 64 75 |extend a| procedu|
|00001680| 72 65 27 73 20 64 6f 6d | 61 69 6e 20 6f 66 20 64 |re's dom|ain of d|
|00001690| 65 66 69 6e 69 74 69 6f | 6e 20 74 6f 20 69 6e 63 |efinitio|n to inc|
|000016a0| 6c 75 64 65 20 73 75 63 | 68 20 61 72 67 75 6d 65 |lude suc|h argume|
|000016b0| 6e 74 73 2e 0a 0a 5c 76 | 65 73 74 20 54 68 69 73 |nts...\v|est This|
|000016c0| 20 72 65 70 6f 72 74 20 | 75 73 65 73 20 74 68 65 | report |uses the|
|000016d0| 20 70 68 72 61 73 65 20 | 60 60 6d 61 79 20 72 65 | phrase |``may re|
|000016e0| 70 6f 72 74 20 61 6e 20 | 69 6d 70 6c 65 6d 65 6e |port an |implemen|
|000016f0| 74 61 74 69 6f 6e 20 65 | 72 72 6f 72 27 27 0a 74 |tation e|rror''.t|
|00001700| 6f 20 69 6e 64 69 63 61 | 74 65 20 63 69 72 63 75 |o indica|te circu|
|00001710| 6d 73 74 61 6e 63 65 73 | 20 75 6e 64 65 72 20 77 |mstances| under w|
|00001720| 68 69 63 68 20 61 6e 20 | 69 6d 70 6c 65 6d 65 6e |hich an |implemen|
|00001730| 74 61 74 69 6f 6e 20 69 | 73 20 70 65 72 6d 69 74 |tation i|s permit|
|00001740| 74 65 64 20 74 6f 0a 72 | 65 70 6f 72 74 20 74 68 |ted to.r|eport th|
|00001750| 61 74 20 69 74 20 69 73 | 20 75 6e 61 62 6c 65 20 |at it is| unable |
|00001760| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 20 65 78 65 63 |to conti|nue exec|
|00001770| 75 74 69 6f 6e 20 6f 66 | 20 61 20 63 6f 72 72 65 |ution of| a corre|
|00001780| 63 74 20 70 72 6f 67 72 | 61 6d 0a 62 65 63 61 75 |ct progr|am.becau|
|00001790| 73 65 20 6f 66 20 73 6f | 6d 65 20 61 72 62 69 74 |se of so|me arbit|
|000017a0| 72 61 72 79 20 72 65 73 | 74 72 69 63 74 69 6f 6e |rary res|triction|
|000017b0| 20 69 6d 70 6f 73 65 64 | 20 62 79 20 74 68 65 20 | imposed| by the |
|000017c0| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2e 0a |implemen|tation..|
|000017d0| 57 68 65 6e 20 61 6e 20 | 69 6d 70 6c 65 6d 65 6e |When an |implemen|
|000017e0| 74 61 74 69 6f 6e 20 65 | 72 72 6f 72 20 69 73 20 |tation e|rror is |
|000017f0| 72 65 70 6f 72 74 65 64 | 2c 20 74 68 65 20 72 65 |reported|, the re|
|00001800| 70 6f 72 74 20 6d 75 73 | 74 20 6d 61 6b 65 20 63 |port mus|t make c|
|00001810| 6c 65 61 72 0a 74 68 61 | 74 20 74 68 65 20 69 6d |lear.tha|t the im|
|00001820| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 69 73 20 |plementa|tion is |
|00001830| 61 74 20 66 61 75 6c 74 | 2e 20 20 49 6d 70 6c 65 |at fault|. Imple|
|00001840| 6d 65 6e 74 61 74 69 6f | 6e 20 72 65 73 74 72 69 |mentatio|n restri|
|00001850| 63 74 69 6f 6e 73 20 61 | 72 65 0a 6f 66 20 63 6f |ctions a|re.of co|
|00001860| 75 72 73 65 20 64 69 73 | 63 6f 75 72 61 67 65 64 |urse dis|couraged|
|00001870| 2e 0a 0a 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |...For e|xample, |
|00001880| 61 6e 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |an imple|mentatio|
|00001890| 6e 20 6d 61 79 20 72 65 | 70 6f 72 74 20 61 6e 20 |n may re|port an |
|000018a0| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 65 |implemen|tation e|
|000018b0| 72 72 6f 72 20 69 66 0a | 69 74 20 64 6f 65 73 20 |rror if.|it does |
|000018c0| 6e 6f 74 20 68 61 76 65 | 20 65 6e 6f 75 67 68 20 |not have| enough |
|000018d0| 73 74 6f 72 61 67 65 20 | 74 6f 20 72 75 6e 20 61 |storage |to run a|
|000018e0| 20 70 72 6f 67 72 61 6d | 2e 0a 0a 5c 76 65 73 74 | program|...\vest|
|000018f0| 20 49 66 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 | If the |value of|
|00001900| 20 61 6e 20 65 78 70 72 | 65 73 73 69 6f 6e 20 69 | an expr|ession i|
|00001910| 73 20 73 61 69 64 20 74 | 6f 20 62 65 20 60 60 75 |s said t|o be ``u|
|00001920| 6e 73 70 65 63 69 66 69 | 65 64 2c 27 27 20 74 68 |nspecifi|ed,'' th|
|00001930| 65 6e 0a 74 68 65 20 65 | 78 70 72 65 73 73 69 6f |en.the e|xpressio|
|00001940| 6e 20 6d 75 73 74 20 65 | 76 61 6c 75 61 74 65 20 |n must e|valuate |
|00001950| 74 6f 20 73 6f 6d 65 20 | 6f 62 6a 65 63 74 20 77 |to some |object w|
|00001960| 69 74 68 6f 75 74 20 73 | 69 67 6e 61 6c 6c 69 6e |ithout s|ignallin|
|00001970| 67 20 61 6e 20 65 72 72 | 6f 72 2c 0a 62 75 74 20 |g an err|or,.but |
|00001980| 74 68 65 20 76 61 6c 75 | 65 20 64 65 70 65 6e 64 |the valu|e depend|
|00001990| 73 20 6f 6e 20 74 68 65 | 20 69 6d 70 6c 65 6d 65 |s on the| impleme|
|000019a0| 6e 74 61 74 69 6f 6e 3b | 20 74 68 69 73 20 72 65 |ntation;| this re|
|000019b0| 70 6f 72 74 20 65 78 70 | 6c 69 63 69 74 6c 79 20 |port exp|licitly |
|000019c0| 64 6f 65 73 0a 6e 6f 74 | 20 73 61 79 20 77 68 61 |does.not| say wha|
|000019d0| 74 20 76 61 6c 75 65 20 | 73 68 6f 75 6c 64 20 62 |t value |should b|
|000019e0| 65 20 72 65 74 75 72 6e | 65 64 2e 0a 0a 5c 74 6f |e return|ed...\to|
|000019f0| 64 6f 7b 54 61 6c 6b 20 | 61 62 6f 75 74 20 75 6e |do{Talk |about un|
|00001a00| 73 70 65 63 69 66 69 65 | 64 20 62 65 68 61 76 69 |specifie|d behavi|
|00001a10| 6f 72 20 76 73 2e 20 75 | 6e 73 70 65 63 69 66 69 |or vs. u|nspecifi|
|00001a20| 65 64 20 76 61 6c 75 65 | 73 2e 7d 0a 0a 5c 74 6f |ed value|s.}..\to|
|00001a30| 64 6f 7b 4c 6f 6f 6b 20 | 61 74 20 4b 4d 50 27 73 |do{Look |at KMP's|
|00001a40| 20 73 69 74 75 61 74 69 | 6f 6e 73 20 70 61 70 65 | situati|ons pape|
|00001a50| 72 2e 7d 0a 0a 0a 5c 73 | 75 62 73 65 63 74 69 6f |r.}...\s|ubsectio|
|00001a60| 6e 7b 45 6e 74 72 79 20 | 66 6f 72 6d 61 74 7d 0a |n{Entry |format}.|
|00001a70| 0a 43 68 61 70 74 65 72 | 73 7e 5c 72 65 66 7b 65 |.Chapter|s~\ref{e|
|00001a80| 78 70 72 65 73 73 69 6f | 6e 63 68 61 70 74 65 72 |xpressio|nchapter|
|00001a90| 7d 20 61 6e 64 7e 5c 72 | 65 66 7b 62 75 69 6c 74 |} and~\r|ef{built|
|00001aa0| 69 6e 63 68 61 70 74 65 | 72 7d 20 61 72 65 20 6f |inchapte|r} are o|
|00001ab0| 72 67 61 6e 69 7a 65 64 | 0a 69 6e 74 6f 20 65 6e |rganized|.into en|
|00001ac0| 74 72 69 65 73 2e 20 20 | 45 61 63 68 20 65 6e 74 |tries. |Each ent|
|00001ad0| 72 79 20 64 65 73 63 72 | 69 62 65 73 20 6f 6e 65 |ry descr|ibes one|
|00001ae0| 20 6c 61 6e 67 75 61 67 | 65 20 66 65 61 74 75 72 | languag|e featur|
|00001af0| 65 20 6f 72 20 61 20 67 | 72 6f 75 70 20 6f 66 0a |e or a g|roup of.|
|00001b00| 72 65 6c 61 74 65 64 20 | 66 65 61 74 75 72 65 73 |related |features|
|00001b10| 2c 20 77 68 65 72 65 20 | 61 20 66 65 61 74 75 72 |, where |a featur|
|00001b20| 65 20 69 73 20 65 69 74 | 68 65 72 20 61 20 73 79 |e is eit|her a sy|
|00001b30| 6e 74 61 63 74 69 63 20 | 63 6f 6e 73 74 72 75 63 |ntactic |construc|
|00001b40| 74 20 6f 72 20 61 0a 62 | 75 69 6c 74 2d 69 6e 20 |t or a.b|uilt-in |
|00001b50| 70 72 6f 63 65 64 75 72 | 65 2e 20 20 41 6e 20 65 |procedur|e. An e|
|00001b60| 6e 74 72 79 20 62 65 67 | 69 6e 73 20 77 69 74 68 |ntry beg|ins with|
|00001b70| 20 6f 6e 65 20 6f 72 20 | 6d 6f 72 65 20 68 65 61 | one or |more hea|
|00001b80| 64 65 72 20 6c 69 6e 65 | 73 20 6f 66 20 74 68 65 |der line|s of the|
|00001b90| 20 66 6f 72 6d 0a 0a 5c | 6e 6f 69 6e 64 65 6e 74 | form..\|noindent|
|00001ba0| 5c 70 70 72 6f 74 6f 7b | 5c 76 61 72 7b 74 65 6d |\pproto{|\var{tem|
|00001bb0| 70 6c 61 74 65 7d 7d 7b | 65 73 73 65 6e 74 69 61 |plate}}{|essentia|
|00001bc0| 6c 20 5c 76 61 72 7b 63 | 61 74 65 67 6f 72 79 7d |l \var{c|ategory}|
|00001bd0| 7d 5c 75 6e 70 65 6e 61 | 6c 74 79 0a 0a 69 66 20 |}\unpena|lty..if |
|00001be0| 74 68 65 20 66 65 61 74 | 75 72 65 20 69 73 20 61 |the feat|ure is a|
|00001bf0| 6e 20 65 73 73 65 6e 74 | 69 61 6c 20 66 65 61 74 |n essent|ial feat|
|00001c00| 75 72 65 2c 20 6f 72 20 | 73 69 6d 70 6c 79 0a 0a |ure, or |simply..|
|00001c10| 5c 6e 6f 69 6e 64 65 6e | 74 5c 70 70 72 6f 74 6f |\noinden|t\pproto|
|00001c20| 7b 5c 76 61 72 7b 74 65 | 6d 70 6c 61 74 65 7d 7d |{\var{te|mplate}}|
|00001c30| 7b 5c 76 61 72 7b 63 61 | 74 65 67 6f 72 79 7d 7d |{\var{ca|tegory}}|
|00001c40| 5c 75 6e 70 65 6e 61 6c | 74 79 0a 0a 69 66 20 74 |\unpenal|ty..if t|
|00001c50| 68 65 20 66 65 61 74 75 | 72 65 20 69 73 20 6e 6f |he featu|re is no|
|00001c60| 74 20 61 6e 20 65 73 73 | 65 6e 74 69 61 6c 20 66 |t an ess|ential f|
|00001c70| 65 61 74 75 72 65 2e 0a | 0a 49 66 20 5c 76 61 72 |eature..|.If \var|
|00001c80| 7b 63 61 74 65 67 6f 72 | 79 7d 20 69 73 20 60 60 |{categor|y} is ``|
|00001c90| 5c 65 78 70 72 74 79 70 | 65 27 27 2c 20 74 68 65 |\exprtyp|e'', the|
|00001ca0| 20 65 6e 74 72 79 20 64 | 65 73 63 72 69 62 65 73 | entry d|escribes|
|00001cb0| 20 61 6e 20 65 78 70 72 | 65 73 73 69 6f 6e 0a 74 | an expr|ession.t|
|00001cc0| 79 70 65 2c 20 61 6e 64 | 20 74 68 65 20 68 65 61 |ype, and| the hea|
|00001cd0| 64 65 72 20 6c 69 6e 65 | 20 67 69 76 65 73 20 74 |der line| gives t|
|00001ce0| 68 65 20 73 79 6e 74 61 | 78 20 6f 66 20 74 68 65 |he synta|x of the|
|00001cf0| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 74 79 70 65 | express|ion type|
|00001d00| 2e 0a 43 6f 6d 70 6f 6e | 65 6e 74 73 20 6f 66 20 |..Compon|ents of |
|00001d10| 65 78 70 72 65 73 73 69 | 6f 6e 73 20 61 72 65 20 |expressi|ons are |
|00001d20| 64 65 73 69 67 6e 61 74 | 65 64 20 62 79 20 73 79 |designat|ed by sy|
|00001d30| 6e 74 61 63 74 69 63 20 | 76 61 72 69 61 62 6c 65 |ntactic |variable|
|00001d40| 73 2c 20 77 68 69 63 68 | 0a 61 72 65 20 77 72 69 |s, which|.are wri|
|00001d50| 74 74 65 6e 20 75 73 69 | 6e 67 20 61 6e 67 6c 65 |tten usi|ng angle|
|00001d60| 20 62 72 61 63 6b 65 74 | 73 2c 20 66 6f 72 20 65 | bracket|s, for e|
|00001d70| 78 61 6d 70 6c 65 2c 20 | 5c 68 79 70 65 72 7b 65 |xample, |\hyper{e|
|00001d80| 78 70 72 65 73 73 69 6f | 6e 7d 2c 0a 5c 68 79 70 |xpressio|n},.\hyp|
|00001d90| 65 72 7b 76 61 72 69 61 | 62 6c 65 7d 2e 20 20 53 |er{varia|ble}. S|
|00001da0| 79 6e 74 61 63 74 69 63 | 20 76 61 72 69 61 62 6c |yntactic| variabl|
|00001db0| 65 73 20 73 68 6f 75 6c | 64 20 62 65 20 75 6e 64 |es shoul|d be und|
|00001dc0| 65 72 73 74 6f 6f 64 20 | 74 6f 20 64 65 6e 6f 74 |erstood |to denot|
|00001dd0| 65 20 73 65 67 6d 65 6e | 74 73 20 6f 66 0a 70 72 |e segmen|ts of.pr|
|00001de0| 6f 67 72 61 6d 20 74 65 | 78 74 3b 20 66 6f 72 20 |ogram te|xt; for |
|00001df0| 65 78 61 6d 70 6c 65 2c | 20 5c 68 79 70 65 72 7b |example,| \hyper{|
|00001e00| 65 78 70 72 65 73 73 69 | 6f 6e 7d 20 73 74 61 6e |expressi|on} stan|
|00001e10| 64 73 20 66 6f 72 20 61 | 6e 79 20 73 74 72 69 6e |ds for a|ny strin|
|00001e20| 67 20 6f 66 0a 63 68 61 | 72 61 63 74 65 72 73 20 |g of.cha|racters |
|00001e30| 77 68 69 63 68 20 69 73 | 20 61 20 73 79 6e 74 61 |which is| a synta|
|00001e40| 63 74 69 63 61 6c 6c 79 | 20 76 61 6c 69 64 20 65 |ctically| valid e|
|00001e50| 78 70 72 65 73 73 69 6f | 6e 2e 20 20 54 68 65 20 |xpressio|n. The |
|00001e60| 6e 6f 74 61 74 69 6f 6e | 0a 5c 62 65 67 69 6e 7b |notation|.\begin{|
|00001e70| 74 61 62 62 69 6e 67 7d | 0a 5c 71 71 75 61 64 20 |tabbing}|.\qquad |
|00001e80| 5c 68 79 70 65 72 69 7b | 74 68 69 6e 67 7d 20 24 |\hyperi{|thing} $|
|00001e90| 5c 6c 64 6f 74 73 24 0a | 5c 65 6e 64 7b 74 61 62 |\ldots$.|\end{tab|
|00001ea0| 62 69 6e 67 7d 0a 69 6e | 64 69 63 61 74 65 73 20 |bing}.in|dicates |
|00001eb0| 7a 65 72 6f 20 6f 72 20 | 6d 6f 72 65 20 6f 63 63 |zero or |more occ|
|00001ec0| 75 72 72 65 6e 63 65 73 | 20 6f 66 20 61 20 5c 68 |urrences| of a \h|
|00001ed0| 79 70 65 72 7b 74 68 69 | 6e 67 7d 2c 20 61 6e 64 |yper{thi|ng}, and|
|00001ee0| 0a 5c 62 65 67 69 6e 7b | 74 61 62 62 69 6e 67 7d |.\begin{|tabbing}|
|00001ef0| 0a 5c 71 71 75 61 64 20 | 5c 68 79 70 65 72 69 7b |.\qquad |\hyperi{|
|00001f00| 74 68 69 6e 67 7d 20 5c | 68 79 70 65 72 69 69 7b |thing} \|hyperii{|
|00001f10| 74 68 69 6e 67 7d 20 24 | 5c 6c 64 6f 74 73 24 0a |thing} $|\ldots$.|
|00001f20| 5c 65 6e 64 7b 74 61 62 | 62 69 6e 67 7d 0a 69 6e |\end{tab|bing}.in|
|00001f30| 64 69 63 61 74 65 73 20 | 6f 6e 65 20 6f 72 20 6d |dicates |one or m|
|00001f40| 6f 72 65 20 6f 63 63 75 | 72 72 65 6e 63 65 73 20 |ore occu|rrences |
|00001f50| 6f 66 20 61 20 5c 68 79 | 70 65 72 7b 74 68 69 6e |of a \hy|per{thin|
|00001f60| 67 7d 2e 0a 0a 49 66 20 | 5c 76 61 72 7b 63 61 74 |g}...If |\var{cat|
|00001f70| 65 67 6f 72 79 7d 20 69 | 73 20 60 60 70 72 6f 63 |egory} i|s ``proc|
|00001f80| 65 64 75 72 65 27 27 2c | 20 74 68 65 6e 20 74 68 |edure'',| then th|
|00001f90| 65 20 65 6e 74 72 79 20 | 64 65 73 63 72 69 62 65 |e entry |describe|
|00001fa0| 73 20 61 20 70 72 6f 63 | 65 64 75 72 65 2c 20 61 |s a proc|edure, a|
|00001fb0| 6e 64 0a 74 68 65 20 68 | 65 61 64 65 72 20 6c 69 |nd.the h|eader li|
|00001fc0| 6e 65 20 67 69 76 65 73 | 20 61 20 74 65 6d 70 6c |ne gives| a templ|
|00001fd0| 61 74 65 20 66 6f 72 20 | 61 20 63 61 6c 6c 20 74 |ate for |a call t|
|00001fe0| 6f 20 74 68 65 20 70 72 | 6f 63 65 64 75 72 65 2e |o the pr|ocedure.|
|00001ff0| 20 20 41 72 67 75 6d 65 | 6e 74 0a 6e 61 6d 65 73 | Argume|nt.names|
|00002000| 20 69 6e 20 74 68 65 20 | 74 65 6d 70 6c 61 74 65 | in the |template|
|00002010| 20 61 72 65 20 5c 76 61 | 72 7b 69 74 61 6c 69 63 | are \va|r{italic|
|00002020| 69 7a 65 64 7d 2e 20 20 | 54 68 75 73 20 74 68 65 |ized}. |Thus the|
|00002030| 20 68 65 61 64 65 72 20 | 6c 69 6e 65 0a 0a 5c 6e | header |line..\n|
|00002040| 6f 69 6e 64 65 6e 74 5c | 70 70 72 6f 74 6f 7b 28 |oindent\|pproto{(|
|00002050| 76 65 63 74 6f 72 2d 72 | 65 66 20 5c 76 61 72 7b |vector-r|ef \var{|
|00002060| 76 65 63 74 6f 72 7d 20 | 5c 76 61 72 7b 6b 7d 29 |vector} |\var{k})|
|00002070| 7d 7b 65 73 73 65 6e 74 | 69 61 6c 20 70 72 6f 63 |}{essent|ial proc|
|00002080| 65 64 75 72 65 7d 5c 75 | 6e 70 65 6e 61 6c 74 79 |edure}\u|npenalty|
|00002090| 0a 0a 69 6e 64 69 63 61 | 74 65 73 20 74 68 61 74 |..indica|tes that|
|000020a0| 20 74 68 65 20 65 73 73 | 65 6e 74 69 61 6c 20 62 | the ess|ential b|
|000020b0| 75 69 6c 74 2d 69 6e 20 | 70 72 6f 63 65 64 75 72 |uilt-in |procedur|
|000020c0| 65 20 7b 5c 74 74 20 76 | 65 63 74 6f 72 2d 72 65 |e {\tt v|ector-re|
|000020d0| 66 7d 20 74 61 6b 65 73 | 0a 74 77 6f 20 61 72 67 |f} takes|.two arg|
|000020e0| 75 6d 65 6e 74 73 2c 20 | 61 20 76 65 63 74 6f 72 |uments, |a vector|
|000020f0| 20 5c 76 61 72 7b 76 65 | 63 74 6f 72 7d 20 61 6e | \var{ve|ctor} an|
|00002100| 64 20 61 6e 20 65 78 61 | 63 74 20 6e 6f 6e 2d 6e |d an exa|ct non-n|
|00002110| 65 67 61 74 69 76 65 20 | 69 6e 74 65 67 65 72 0a |egative |integer.|
|00002120| 5c 76 61 72 7b 6b 7d 20 | 28 73 65 65 20 62 65 6c |\var{k} |(see bel|
|00002130| 6f 77 29 2e 20 20 54 68 | 65 20 68 65 61 64 65 72 |ow). Th|e header|
|00002140| 20 6c 69 6e 65 73 0a 0a | 5c 6e 6f 69 6e 64 65 6e | lines..|\noinden|
|00002150| 74 25 0a 5c 70 70 72 6f | 74 6f 7b 28 6d 61 6b 65 |t%.\ppro|to{(make|
|00002160| 2d 76 65 63 74 6f 72 20 | 5c 76 61 72 7b 6b 7d 29 |-vector |\var{k})|
|00002170| 7d 7b 65 73 73 65 6e 74 | 69 61 6c 20 70 72 6f 63 |}{essent|ial proc|
|00002180| 65 64 75 72 65 7d 0a 5c | 70 70 72 6f 74 6f 7b 28 |edure}.\|pproto{(|
|00002190| 6d 61 6b 65 2d 76 65 63 | 74 6f 72 20 5c 76 61 72 |make-vec|tor \var|
|000021a0| 7b 6b 7d 20 5c 76 61 72 | 7b 66 69 6c 6c 7d 29 7d |{k} \var|{fill})}|
|000021b0| 7b 70 72 6f 63 65 64 75 | 72 65 7d 5c 75 6e 70 65 |{procedu|re}\unpe|
|000021c0| 6e 61 6c 74 79 0a 0a 69 | 6e 64 69 63 61 74 65 20 |nalty..i|ndicate |
|000021d0| 74 68 61 74 20 69 6e 20 | 61 6c 6c 20 69 6d 70 6c |that in |all impl|
|000021e0| 65 6d 65 6e 74 61 74 69 | 6f 6e 73 2c 20 74 68 65 |ementati|ons, the|
|000021f0| 20 7b 5c 74 74 20 6d 61 | 6b 65 2d 76 65 63 74 6f | {\tt ma|ke-vecto|
|00002200| 72 7d 20 70 72 6f 63 65 | 64 75 72 65 0a 6d 75 73 |r} proce|dure.mus|
|00002210| 74 20 62 65 20 64 65 66 | 69 6e 65 64 20 74 6f 20 |t be def|ined to |
|00002220| 74 61 6b 65 20 6f 6e 65 | 20 61 72 67 75 6d 65 6e |take one| argumen|
|00002230| 74 2c 20 61 6e 64 20 73 | 6f 6d 65 20 69 6d 70 6c |t, and s|ome impl|
|00002240| 65 6d 65 6e 74 61 74 69 | 6f 6e 73 20 77 69 6c 6c |ementati|ons will|
|00002250| 0a 65 78 74 65 6e 64 20 | 69 74 20 74 6f 20 74 61 |.extend |it to ta|
|00002260| 6b 65 20 74 77 6f 20 61 | 72 67 75 6d 65 6e 74 73 |ke two a|rguments|
|00002270| 2e 0a 0a 5c 6c 61 62 65 | 6c 7b 74 79 70 65 63 6f |...\labe|l{typeco|
|00002280| 6e 76 65 6e 74 69 6f 6e | 73 7d 0a 49 74 20 69 73 |nvention|s}.It is|
|00002290| 20 61 6e 20 65 72 72 6f | 72 20 66 6f 72 20 61 6e | an erro|r for an|
|000022a0| 20 6f 70 65 72 61 74 69 | 6f 6e 20 74 6f 20 62 65 | operati|on to be|
|000022b0| 20 70 72 65 73 65 6e 74 | 65 64 20 77 69 74 68 20 | present|ed with |
|000022c0| 61 6e 20 61 72 67 75 6d | 65 6e 74 20 74 68 61 74 |an argum|ent that|
|000022d0| 20 69 74 0a 69 73 20 6e | 6f 74 20 73 70 65 63 69 | it.is n|ot speci|
|000022e0| 66 69 65 64 20 74 6f 20 | 68 61 6e 64 6c 65 2e 20 |fied to |handle. |
|000022f0| 20 46 6f 72 20 73 75 63 | 63 69 6e 63 74 6e 65 73 | For suc|cinctnes|
|00002300| 73 2c 20 77 65 20 66 6f | 6c 6c 6f 77 20 74 68 65 |s, we fo|llow the|
|00002310| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 0a 74 68 61 74 | convent|ion.that|
|00002320| 20 69 66 20 61 6e 20 61 | 72 67 75 6d 65 6e 74 20 | if an a|rgument |
|00002330| 6e 61 6d 65 20 69 73 20 | 61 6c 73 6f 20 74 68 65 |name is |also the|
|00002340| 20 6e 61 6d 65 20 6f 66 | 20 61 20 74 79 70 65 2c | name of| a type,|
|00002350| 20 74 68 65 6e 20 74 68 | 69 73 20 69 6d 70 6c 69 | then th|is impli|
|00002360| 65 73 20 61 0a 72 65 73 | 74 72 69 63 74 69 6f 6e |es a.res|triction|
|00002370| 20 6f 6e 20 74 68 65 20 | 74 79 70 65 20 6f 66 20 | on the |type of |
|00002380| 74 68 61 74 20 61 72 67 | 75 6d 65 6e 74 20 74 6f |that arg|ument to|
|00002390| 20 74 68 65 20 70 72 6f | 63 65 64 75 72 65 2e 20 | the pro|cedure. |
|000023a0| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 0a 74 68 | For exa|mple,.th|
|000023b0| 65 20 68 65 61 64 65 72 | 20 6c 69 6e 65 20 66 6f |e header| line fo|
|000023c0| 72 20 7b 5c 74 74 20 76 | 65 63 74 6f 72 2d 72 65 |r {\tt v|ector-re|
|000023d0| 66 7d 20 67 69 76 65 6e | 20 61 62 6f 76 65 20 64 |f} given| above d|
|000023e0| 69 63 74 61 74 65 73 20 | 74 68 61 74 20 74 68 65 |ictates |that the|
|000023f0| 20 66 69 72 73 74 0a 61 | 72 67 75 6d 65 6e 74 20 | first.a|rgument |
|00002400| 74 6f 20 7b 5c 74 74 20 | 76 65 63 74 6f 72 2d 72 |to {\tt |vector-r|
|00002410| 65 66 7d 20 6d 75 73 74 | 20 62 65 20 61 20 76 65 |ef} must| be a ve|
|00002420| 63 74 6f 72 2e 20 20 54 | 68 65 20 66 6f 6c 6c 6f |ctor. T|he follo|
|00002430| 77 69 6e 67 20 6e 61 6d | 69 6e 67 0a 63 6f 6e 76 |wing nam|ing.conv|
|00002440| 65 6e 74 69 6f 6e 73 20 | 61 6c 73 6f 20 69 6d 70 |entions |also imp|
|00002450| 6c 79 20 74 79 70 65 20 | 72 65 73 74 72 69 63 74 |ly type |restrict|
|00002460| 69 6f 6e 73 3a 0a 5c 6e | 65 77 63 6f 6d 6d 61 6e |ions:.\n|ewcomman|
|00002470| 64 7b 5c 66 6f 6f 7d 5b | 31 5d 7b 5c 76 72 7b 23 |d{\foo}[|1]{\vr{#|
|00002480| 31 7d 2c 20 5c 76 72 69 | 7b 23 31 7d 2c 20 24 5c |1}, \vri|{#1}, $\|
|00002490| 6c 64 6f 74 73 24 20 5c | 76 72 6a 7b 23 31 7d 2c |ldots$ \|vrj{#1},|
|000024a0| 20 24 5c 6c 64 6f 74 73 | 24 7d 0a 24 24 0a 5c 62 | $\ldots|$}.$$.\b|
|000024b0| 65 67 69 6e 7b 74 61 62 | 75 6c 61 72 7d 7b 6c 6c |egin{tab|ular}{ll|
|000024c0| 7d 0a 5c 76 61 72 7b 6f | 62 6a 7d 26 61 6e 79 20 |}.\var{o|bj}&any |
|000024d0| 6f 62 6a 65 63 74 5c 5c | 0a 5c 66 6f 6f 7b 7a 7d |object\\|.\foo{z}|
|000024e0| 26 63 6f 6d 70 6c 65 78 | 2c 20 72 65 61 6c 2c 20 |&complex|, real, |
|000024f0| 72 61 74 69 6f 6e 61 6c | 2c 20 69 6e 74 65 67 65 |rational|, intege|
|00002500| 72 5c 5c 0a 5c 66 6f 6f | 7b 78 7d 26 72 65 61 6c |r\\.\foo|{x}&real|
|00002510| 2c 20 72 61 74 69 6f 6e | 61 6c 2c 20 69 6e 74 65 |, ration|al, inte|
|00002520| 67 65 72 5c 5c 0a 5c 66 | 6f 6f 7b 79 7d 26 72 65 |ger\\.\f|oo{y}&re|
|00002530| 61 6c 2c 20 72 61 74 69 | 6f 6e 61 6c 2c 20 69 6e |al, rati|onal, in|
|00002540| 74 65 67 65 72 5c 5c 0a | 5c 66 6f 6f 7b 71 7d 26 |teger\\.|\foo{q}&|
|00002550| 65 78 61 63 74 20 72 61 | 74 69 6f 6e 61 6c 2c 20 |exact ra|tional, |
|00002560| 65 78 61 63 74 20 69 6e | 74 65 67 65 72 5c 5c 0a |exact in|teger\\.|
|00002570| 5c 66 6f 6f 7b 6e 7d 26 | 69 6e 74 65 67 65 72 5c |\foo{n}&|integer\|
|00002580| 5c 0a 5c 66 6f 6f 7b 6b | 7d 26 65 78 61 63 74 20 |\.\foo{k|}&exact |
|00002590| 6e 6f 6e 2d 6e 65 67 61 | 74 69 76 65 20 69 6e 74 |non-nega|tive int|
|000025a0| 65 67 65 72 5c 5c 0a 5c | 65 6e 64 7b 74 61 62 75 |eger\\.\|end{tabu|
|000025b0| 6c 61 72 7d 0a 24 24 0a | 0a 5c 74 6f 64 6f 7b 50 |lar}.$$.|.\todo{P|
|000025c0| 72 6f 76 69 64 65 20 61 | 6e 20 65 78 61 6d 70 6c |rovide a|n exampl|
|000025d0| 65 20 65 6e 74 72 79 3f | 3f 7d 0a 0a 0a 5c 73 75 |e entry?|?}...\su|
|000025e0| 62 73 65 63 74 69 6f 6e | 7b 45 76 61 6c 75 61 74 |bsection|{Evaluat|
|000025f0| 69 6f 6e 20 65 78 61 6d | 70 6c 65 73 7d 0a 0a 54 |ion exam|ples}..T|
|00002600| 68 65 20 73 79 6d 62 6f | 6c 20 60 60 5c 65 76 61 |he symbo|l ``\eva|
|00002610| 6c 73 74 6f 27 27 20 75 | 73 65 64 20 69 6e 20 70 |lsto'' u|sed in p|
|00002620| 72 6f 67 72 61 6d 20 65 | 78 61 6d 70 6c 65 73 20 |rogram e|xamples |
|00002630| 73 68 6f 75 6c 64 20 62 | 65 20 72 65 61 64 0a 60 |should b|e read.`|
|00002640| 60 65 76 61 6c 75 61 74 | 65 73 20 74 6f 2e 27 27 |`evaluat|es to.''|
|00002650| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0a 0a | For ex|ample,..|
|00002660| 5c 62 65 67 69 6e 7b 73 | 63 68 65 6d 65 7d 0a 28 |\begin{s|cheme}.(|
|00002670| 2a 20 35 20 38 29 20 20 | 20 20 20 20 5c 65 76 20 |* 5 8) | \ev |
|00002680| 20 34 30 25 0a 5c 65 6e | 64 7b 73 63 68 65 6d 65 | 40%.\en|d{scheme|
|00002690| 7d 0a 0a 6d 65 61 6e 73 | 20 74 68 61 74 20 74 68 |}..means| that th|
|000026a0| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 7b 5c 74 |e expres|sion {\t|
|000026b0| 74 28 2a 20 35 20 38 29 | 7d 20 65 76 61 6c 75 61 |t(* 5 8)|} evalua|
|000026c0| 74 65 73 20 74 6f 20 74 | 68 65 20 6f 62 6a 65 63 |tes to t|he objec|
|000026d0| 74 20 7b 5c 74 74 20 34 | 30 7d 2e 0a 4f 72 2c 20 |t {\tt 4|0}..Or, |
|000026e0| 6d 6f 72 65 20 70 72 65 | 63 69 73 65 6c 79 3a 20 |more pre|cisely: |
|000026f0| 20 74 68 65 20 65 78 70 | 72 65 73 73 69 6f 6e 20 | the exp|ression |
|00002700| 67 69 76 65 6e 20 62 79 | 20 74 68 65 20 73 65 71 |given by| the seq|
|00002710| 75 65 6e 63 65 20 6f 66 | 20 63 68 61 72 61 63 74 |uence of| charact|
|00002720| 65 72 73 0a 60 60 7b 5c | 74 74 28 2a 20 35 20 38 |ers.``{\|tt(* 5 8|
|00002730| 29 7d 27 27 20 65 76 61 | 6c 75 61 74 65 73 2c 20 |)}'' eva|luates, |
|00002740| 69 6e 20 74 68 65 20 69 | 6e 69 74 69 61 6c 20 65 |in the i|nitial e|
|00002750| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2c 20 74 6f 20 61 |nvironme|nt, to a|
|00002760| 6e 20 6f 62 6a 65 63 74 | 0a 74 68 61 74 20 6d 61 |n object|.that ma|
|00002770| 79 20 62 65 20 72 65 70 | 72 65 73 65 6e 74 65 64 |y be rep|resented|
|00002780| 20 65 78 74 65 72 6e 61 | 6c 6c 79 20 62 79 20 74 | externa|lly by t|
|00002790| 68 65 20 73 65 71 75 65 | 6e 63 65 20 6f 66 20 63 |he seque|nce of c|
|000027a0| 68 61 72 61 63 74 65 72 | 73 20 60 60 7b 5c 74 74 |haracter|s ``{\tt|
|000027b0| 0a 34 30 7d 27 27 2e 20 | 20 53 65 65 20 73 65 63 |.40}''. | See sec|
|000027c0| 74 69 6f 6e 7e 5c 72 65 | 66 7b 65 78 74 65 72 6e |tion~\re|f{extern|
|000027d0| 61 6c 72 65 70 73 7d 20 | 66 6f 72 20 61 20 64 69 |alreps} |for a di|
|000027e0| 73 63 75 73 73 69 6f 6e | 20 6f 66 20 65 78 74 65 |scussion| of exte|
|000027f0| 72 6e 61 6c 0a 72 65 70 | 72 65 73 65 6e 74 61 74 |rnal.rep|resentat|
|00002800| 69 6f 6e 73 20 6f 66 20 | 6f 62 6a 65 63 74 73 2e |ions of |objects.|
|00002810| 0a 0a 0a 5c 74 6f 64 6f | 7b 5c 73 75 62 73 65 63 |...\todo|{\subsec|
|00002820| 74 69 6f 6e 7b 4e 61 6d | 69 6e 67 20 63 6f 6e 76 |tion{Nam|ing conv|
|00002830| 65 6e 74 69 6f 6e 73 7d | 7d 0a 09 0a 5c 74 6f 64 |entions}|}...\tod|
|00002840| 6f 7b 54 65 72 6d 73 20 | 74 68 61 74 20 6e 65 65 |o{Terms |that nee|
|00002850| 64 20 64 65 66 69 6e 69 | 6e 67 3a 20 74 68 75 6e |d defini|ng: thun|
|00002860| 6b 2c 20 63 6f 6d 6d 61 | 6e 64 2c 20 6d 75 74 61 |k, comma|nd, muta|
|00002870| 74 69 6f 6e 20 70 72 6f | 63 65 64 75 72 65 2c 0a |tion pro|cedure,.|
|00002880| 28 77 68 61 74 20 65 6c | 73 65 3f 29 2e 20 20 54 |(what el|se?). T|
|00002890| 68 65 20 7b 5c 74 74 3f | 7d 2c 20 7b 5c 74 74 21 |he {\tt?|}, {\tt!|
|000028a0| 7d 2c 20 61 6e 64 20 7b | 5c 74 74 2d 3e 7d 20 63 |}, and {|\tt->} c|
|000028b0| 6f 6e 76 65 6e 74 69 6f | 6e 73 20 73 68 6f 75 6c |onventio|ns shoul|
|000028c0| 64 20 62 65 0a 65 78 70 | 6c 61 69 6e 65 64 20 73 |d be.exp|lained s|
|000028d0| 6f 6d 65 77 68 65 72 65 | 2e 7d 0a 0a 5c 74 6f 64 |omewhere|.}..\tod|
|000028e0| 6f 7b 4a 75 73 74 20 73 | 61 79 20 73 6f 6d 65 77 |o{Just s|ay somew|
|000028f0| 68 65 72 65 20 74 68 61 | 74 20 74 68 65 20 76 61 |here tha|t the va|
|00002900| 6c 75 65 20 6f 66 20 70 | 72 6f 63 65 64 75 72 65 |lue of p|rocedure|
|00002910| 73 20 77 68 6f 73 65 20 | 6e 61 6d 65 73 20 65 6e |s whose |names en|
|00002920| 64 20 69 6e 0a 7b 5c 74 | 74 21 7d 5c 20 69 73 20 |d in.{\t|t!}\ is |
|00002930| 75 6e 73 70 65 63 69 66 | 69 65 64 2e 7d 0a |unspecif|ied.}. |
+--------+-------------------------+-------------------------+--------+--------+